# -*- coding: utf-8 -*-

"""
@Datetime: 2019/5/21
@Author: Zhang Yafei
"""
level = 'L0'
n = 22


def func():
    level = 'L1'
    n = 33
    print(locals())

    def outer():
        n = 44
        level = 'L2'
        print(locals(), n)

        def inner():
            level = 'L3'
            print(locals(), n) #此外打印的n是多少？

        inner()
    outer()

func()

# {'n': 33, 'level': 'L1'}
# {'level': 'L2', 'n': 44} 44
# {'level': 'L3', 'n': 44} 44